<template>
  <div class="a-tag a-tag--normal">
    <text v-if="tTitle" class="a-tag__left"> {{ tTitle }}： </text>
    <text v-if="tValue" class="a-tag__right"> {{ tValue }} </text>
    <slot />
  </div>
</template>

<script lang="ts">
import { toRef } from 'vue';
import './index.less';

export default {
  props: {
    title: String,
    value: [String, Number],
  },
  setup(props) {
    const tValue = toRef(props, 'value');
    const tTitle = toRef(props, 'title');
    return {
      tValue,
      tTitle,
    };
  },
};
</script>
